package com.situ.boot.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "sgry", schema = "brcc", catalog = "")
public class SgryEntity {
    private int id;
    private String sgname;
    private String sgcomn;
    private Integer sgcout;
    private String rystat;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "sgname")
    public String getSgname() {
        return sgname;
    }

    public void setSgname(String sgname) {
        this.sgname = sgname;
    }

    @Basic
    @Column(name = "sgcomn")
    public String getSgcomn() {
        return sgcomn;
    }

    public void setSgcomn(String sgcomn) {
        this.sgcomn = sgcomn;
    }

    @Basic
    @Column(name = "sgcout")
    public Integer getSgcout() {
        return sgcout;
    }

    public void setSgcout(Integer sgcout) {
        this.sgcout = sgcout;
    }

    @Basic
    @Column(name = "rystat")
    public String getRystat() {
        return rystat;
    }

    public void setRystat(String rystat) {
        this.rystat = rystat;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SgryEntity that = (SgryEntity) o;
        return id == that.id &&
                Objects.equals(sgname, that.sgname) &&
                Objects.equals(sgcomn, that.sgcomn) &&
                Objects.equals(sgcout, that.sgcout) &&
                Objects.equals(rystat, that.rystat);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, sgname, sgcomn, sgcout, rystat);
    }
}
